<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    var url = "{{$url}}";
    location.href=url;
    /*
    window.onload = function(){
        openApp("unclone://download/source?url="+url);
    }*/

    function openApp(schemeUrl,beforeCallback,afterCallback){
        if(typeof(beforeCallback)=="function"){
            return false;
        }
        var startTime = Date.now();
        var ifr = document.createElement('iframe');
        ifr.src = schemeUrl;
        ifr.style.display = 'none';
        document.body.appendChild(ifr);
        var t = setTimeout(function() {
            var endTime = Date.now();
            if(typeof(afterCallback)=="function"){
                afterCallback();
            }
            if (!startTime || endTime - startTime < 3000 + 200) {
                location.href = url;
            } else {

            }
        }, 1000);

        window.onblur = function() {
            clearTimeout(t);
        }
    }
</script>
</body>
</html>